package cn.wolfcode.wolf2w.util;

import cn.wolfcode.wolf2w.exception.LogicException;

public class AssertUtil {
	//判空
	public static void hasLength(String value,String msg){
		if(value == null || "".equals(value.trim())){
			throw new LogicException(msg);
		}
	}
	// 判断两个值是否相等
	public static void isEquals(String value1,String value2,String msg){
		hasLength(value1,msg+"不允许为空");
		hasLength(value2,msg+"不允许为空");
		if(!value1.equals(value2)){
			throw new LogicException(msg+"不一致");
		}
	}
}
